//
//  graph_reduction.c
//  TreeDecomposition
//
//  Created by Benoît Vanalderweireldt on 10/06/12.
//  Copyright (c) 2012 Sofware Project. All rights reserved.
//

#include <stdio.h>
#include "graph_reduction.h"

/*
Input the undirected graph, return the stack
*/
struct pile grap_reduction(linkVertices* list){
//create a new stack
pile_t * stack = init(50);
    
linkVertices* temp=list;
while(temp->v!=NULL)
    {
        if (temp->nxt != NULL) {
            empile(stack, temp);
            temp = temp->nxt;
        }
        else {
            break;
        }
    }
return *stack;
}

void remove_upto(int x, struct pile pile, struct linkVertices list){
   /* while(true)
        if there exists a vertex v with degree less than x then {v1,...,vx} = neighbors of v;
            build a clique for {v1,...,vx};
            push v,v1,...,vx into S;
            delete v and all its edges from UG; else
            break;
        end if 
    end while*/
}


